﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="WindowAbout.xaml.cs" company="Jens Horstmann">
//   Copyright (c) Jens Horstmann. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace MiniMusicPlayer.Windows
{
    using System.Diagnostics;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;

    /// <summary>
    /// Interaction logic for WindowAbout.xaml.
    /// </summary>
    public partial class WindowAbout : Window
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="WindowAbout"/> class.
        /// </summary>
        public WindowAbout()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// The move.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private void Move(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        /// <summary>
        /// The visit me image clicked.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private void VisitMeImageClicked(object sender, MouseButtonEventArgs e)
        {
            var image = sender as Image;
            if (image != null)
            {
                Process.Start(new ProcessStartInfo((string)image.Tag));
            }
        }

        private void LinkClicked(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
        {
            Process.Start(e.Uri.AbsoluteUri);
            e.Handled = true;
        }

        private void CloseClicked(object sender, RoutedEventArgs e)
        {
            this.Hide();
        }
    }
}